﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DeviceSDK.LED
{
    public class PlaybillProgramInfo:ICloneable
    {
        public int ID;
        public bool IsDeleteFile;
        public string ProgramName;
        public string Type;
        public string FilePath;
        public string[] FilePaths;
        public int IsEffectRand;
        public int Effect;
        public int EffectTime;
        public int PlayTime;
        public int X;
        public int Y;
        public int Width;
        public int Height;


        public string Text;
        public string[] Texts;
        public int PositionHor;
        public int PositionVer;
        public string FontName;
        public string FontColor;
        public string FontAlign;
        public int FontSize;
        public int LineSpace;
        public int ScreenAreaID;
        public bool FontIsBold;


      

        public object Clone()
        {
            return this.MemberwiseClone();
        }

        public int GetFontColorInt()
        {
            int r = Convert.ToInt32("0x" + FontColor.Substring(1, 2), 16);

            int g = Convert.ToInt32("0x" + FontColor.Substring(3, 2), 16);

            int b = Convert.ToInt32("0x" + FontColor.Substring(5, 2), 16);

            System.Drawing.Color c = System.Drawing.Color.FromArgb(r, g, b);
            return (int)(((int)c.B << 16) | (ushort)(((ushort)c.G << 8) | c.R));
        }

    }
}
